/*
 * Diego Zamboni Latance 			344990
 * Fellipe Augusto Ruiz de Souza 	344796
 * 
 */
package ast;

import java.util.*;

public class ParamList {

	public ParamList() {
		paramList = new ArrayList<Variable>();
	}

	public void addElement(Variable v) {
		paramList.add(v);
	}

	public int getSize() {
		return paramList.size();
	}

	public Variable get(int i) {
		return paramList.get(i);
	}

	public void genKrakatoa(PW pw) {
		for (int i = 0; i < paramList.size(); i++) {
			pw.print(paramList.get(i).getType().getKrakatoaName() + " ");
			paramList.get(i).genKrakatoa(pw);
			if (i + 1 < paramList.size())
				pw.print(", ");
		}
	}

	private ArrayList<Variable> paramList;

}
